# Read File Into Vector
snippet rf
	std::vector<char> ${3:v};
	if (FILE *${2:fp} = fopen("${1:filename}", "r")) {
		char buf[${4:1024}];
		while (size_t len = fread(buf, 1, sizeof(buf), $2))
			$3.insert($3.end(), buf, buf + len);
		fclose($2);
	}${5}
# const
snippet c
	const
snippet us
	using namespace ${1:std};
snippet tem
	template<${1:type}>
	${2:// your template code here.}
# std::map
snippet map
	std::map<${1:key}, ${2:value}> map${3};
# std::vector
snippet vec
	std::vector<${1:char}> v${2};
# std::deque 
snippet deq
	std::deque<${1:char}> q${2};
# std::stack 
snippet sta
	std::stack<${1:char}> stack${2};
# std::xx::iterator
snippet ite 
	std::${1:vector}<${2:char}>::iterator ${3:iter} ;
	${4:// next code}
# std::for_each 
snippet fe
	std::for_each(${1:var}.begin(),$1.end(),
			${2:func}(${3}$1${4}));
snippet forcpp
	for( ${1:iter} = ${2:container}.begin(); $1 != $2.end(); ++$1 ){
		${4:/* code */}
	}
	${5}

# Namespace
snippet ns
	namespace ${1:`Filename('', 'my')`} {
		${2}
	} /* $1 */
# Class
snippet cl
	class ${1:`Filename('$1_t', 'name')`} {
	public:
		$1 (${2:arguments});
		virtual ~$1 ();
	
	private:
		${3:/* data */}
	};
# Added by HuangHai at 2009年 11月 05日 星期四 16:32:52 CST
#snippet ///
#	////////////////////////////
#	// Function ${1}	
#	// return value type: ${2} 
#	// arg 1: ${3} 		
#	// arg 2: ${4} 		
#	// Author : ${5} 	
#	// Date   : ${6} 	
#	/////////////////////////////
#	${7}
